Skip to content

fix(deps): update dependency @mastra/mcp to v1#50

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/mastra-mcp-1.x
Open

fix(deps): update dependency @mastra/mcp to v1#50
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/mastra-mcp-1.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Jan 21, 2026

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
@mastra/mcp (source) ^0.11.0^1.0.0 age confidence

Release Notes

mastra-ai/mastra (@​mastra/mcp)

v1.8.0

Compare Source

Minor Changes
  • Added MCP tool annotations to the requireToolApproval context and exposed them on tools returned from listTools() / listToolsets(). (#​16784)

    The requireToolApproval callback now receives the server-advertised annotations (title, readOnlyHint, destructiveHint, idempotentHint, openWorldHint) alongside toolName and args. This lets you write declarative approval policies instead of hardcoding tool name lists. Annotations are also propagated onto Mastra tools as tool.mcp.annotations so apps can render them in UI.

    Security caveat (per the MCP spec): annotations are hints, not guarantees. Clients MUST treat them as untrusted unless they come from a trusted server. Do not use annotations alone as a security boundary for servers you do not control — set requireToolApproval: true for those. When the server omits annotations entirely, this field is undefined, so policies can distinguish "no annotations" from "annotated as safe".

    import { MCPClient } from '@​mastra/mcp';
    
    // Before — hardcoded tool name lists, server-specific
    const mcp = new MCPClient({
      servers: {
        github: {
          url: new URL('https://example.com/mcp'),
          requireToolApproval: ({ toolName }) => toolName === 'delete_repo',
        },
      },
    });
    
    // After — annotation-driven, works across any trusted MCP server
    const mcp = new MCPClient({
      servers: {
        github: {
          url: new URL('https://example.com/mcp'),
          requireToolApproval: ({ annotations }) => {
            if (!annotations) return true;
            if (annotations.readOnlyHint) return false;
            if (annotations.destructiveHint) return true;
            return false;
          },
        },
      },
    });
    
    // Annotations are also visible on tools returned by listTools()
    const tools = await mcp.listTools();
    for (const tool of Object.values(tools)) {
      console.log(tool.mcp?.annotations);
    }

    Closes #​16766.

Patch Changes

v1.7.0

Compare Source

Minor Changes
  • Added MCP Apps support for interactive UI rendering over MCP. (#​16004)

    MCPClientServerProxy — a lightweight proxy that delegates resource and tool operations to remote MCP servers via MCPClient, enabling Studio to fetch app resources from any connected server.

    toMCPServerProxies() — new convenience method on MCPClient that creates proxy objects for all configured servers, ready for Mastra-level registration.

    Automatic serverId stamping — tools returned by listTools() now carry _meta.ui.serverId, allowing consumers to resolve ui:// app resources from the correct MCP server in multi-server environments.

    const mcp = new MCPClient({
      servers: {
        myApps: { url: new URL('https://my-mcp-server.example.com/mcp') },
      },
    });
    
    const mastra = new Mastra({
      agents: { myAgent },
      mcpServers: { ...mcp.toMCPServerProxies() },
    });
  • Added MCP Apps extension support (SEP-1865). MCPServer now accepts an appResources config to register interactive ui:// HTML resources. MCPClient preserves full tool _meta (including ui.resourceUri) when converting MCP tools to Mastra tools. Both advertise the io.modelcontextprotocol/ui extension capability. (#​16004)

    Example — MCPServer with app resources:

    const server = new MCPServer({
      name: 'my-server',
      tools: { myTool },
      appResources: {
        dashboard: {
          name: 'Dashboard',
          description: 'Interactive dashboard UI',
          html: '<html>...</html>',
        },
      },
    });
Patch Changes

v1.6.0

Compare Source

Minor Changes
  • Added jsonSchemaValidator pass-through option on MCPClient server entries and MCPServer. Forward this option from @modelcontextprotocol/sdk to opt into a non-default validator. Pass CfWorkerJsonSchemaValidator from @modelcontextprotocol/sdk/validation/cfworker to make tools with outputSchema work in Cloudflare Workers / V8 isolates, where the default Ajv validator's new Function(...) compile path is blocked. (#​15866)

    import { MCPClient, MCPServer } from '@&#8203;mastra/mcp';
    import { CfWorkerJsonSchemaValidator } from '@&#8203;modelcontextprotocol/sdk/validation/cfworker';
    
    const mcp = new MCPClient({
      servers: {
        upstream: {
          url: new URL('https://example/mcp'),
          jsonSchemaValidator: new CfWorkerJsonSchemaValidator(),
        },
      },
    });
    
    const server = new MCPServer({
      name: 'My Server',
      version: '1.0.0',
      tools: { ... },
      jsonSchemaValidator: new CfWorkerJsonSchemaValidator(),
    });

    Closes #​15862.

Patch Changes

v1.5.2

Compare Source

Patch Changes

v1.5.1

Compare Source

Patch Changes

v1.5.0

Compare Source

Minor Changes
  • Added requireToolApproval option to MCP server configuration for requiring human approval before tool execution. Supports both boolean (all tools) and function (dynamic per-tool logic). (#​15315)
Patch Changes

v1.4.2

Compare Source

Patch Changes
  • Improved MCP tool discovery to retry once after reconnectable connection errors like Connection closed during tools/list. (#​15141)

    MCPClient.listToolsets(), listToolsetsWithErrors(), and listTools() now attempt a reconnect before treating transient discovery failures as missing tools.

  • Fixed MCP server to return HTTP 404 (instead of 400) when a client sends a stale or unknown session ID. Per the MCP spec, this tells clients to re-initialize with a new session, which fixes broken tool calls after server redeploys. (#​15160)

  • Updated dependencies [8db7663, 153e864, 715710d, 378c6c4, 9f91fd5, ba6fa9c]:

v1.4.1

Compare Source

Patch Changes
  • Standardized all logger calls across the codebase to use static string messages with structured data objects. Dynamic values are now passed as key-value pairs in the second argument instead of being interpolated into template literal strings. This improves log filterability and searchability in observability storage. (#​14899)

    Removed ~150 redundant or noisy log calls including duplicate error logging after trackException and verbose in-memory storage CRUD traces.

  • Updated dependencies [cbeec24, cee146b, aa0aeff, 2bcec65, ad9bded, cbeec24, 208c0bb, f566ee7]:

v1.4.0

Compare Source

Minor Changes
  • Added support for passing custom _meta metadata when calling tools on external MCP servers. The execute context now accepts an optional _meta field with arbitrary key-value pairs that are forwarded in the callTool request, enabling use cases like distributed tracing, compliance tagging, and multi-tenant routing. Custom _meta is merged with the progress token when progress tracking is enabled. (#​14809)

    const tools = await mcpClient.tools();
    await tools['my_tool'].execute({ query: 'active users' }, { _meta: { traceId: 'span-456', tenantId: 'org-123' } });

    When enableProgressTracking is enabled, the progressToken is automatically merged into _meta alongside your custom fields.

Patch Changes

v1.3.2

Compare Source

Patch Changes

v1.3.1

Compare Source

Patch Changes
  • Fixed MCP tool results to preserve the standard CallToolResult envelope shape. Previously, content was extracted from the envelope which broke consumers expecting the standard MCP result format. Output schema validation is now handled internally by the MCP SDK's AJV validator instead of Zod, preventing unrecognized keys from being stripped. (#​14519)

  • Fix MCP tool results returning empty {} when tool has no outputSchema (#​14372)

  • Fixed child processes started by the MCP client staying alive after the terminal session closes. (#​13977)

  • Fixed regular tools executed via MCPServer now receive requestContext populated from mcp.extra, matching the behavior of agent and workflow tools. All tool types now consistently propagate authentication and request context. (#​14349)

  • Updated dependencies [cb611a1, da93115, 62d1d3c, 9e1a3ed, 8681ecb, 28d0249, 681ee1c, bb0f09d, a579f7a, 5f7e9d0, d7f14c3, 0efe12a]:

v1.3.0

Compare Source

Minor Changes
  • Added new MCP client APIs for per-server control and diagnostics. (#​14377)

    • Added reconnectServer(serverName) to reconnect a single MCP server without restarting all servers.
    • Added listToolsetsWithErrors() to return both toolsets and per-server errors.
    • Added getServerStderr(serverName) to inspect piped stderr for stdio servers.

    Example

    const { toolsets, errors } = await mcpClient.listToolsetsWithErrors();
    await mcpClient.reconnectServer('slack');
    const stderr = mcpClient.getServerStderr('slack');
Patch Changes
  • Improved (#​14260)

    • Updated @modelcontextprotocol/sdk from ^1.17.5 to ^1.27.1.

    Deprecated

    • Deprecated prompt version usage in @mastra/mcp.
    • Prompt versions are not part of MCP protocol behavior and will be removed.

    Migration

    • Use unique prompt names instead of prompt versions.
    • Before: client.prompts.get({ name: 'explain-code', version: 'v1', args })
    • After: client.prompts.get({ name: 'explain-code-v1', args })
    • MastraPrompt is available for migration and is also deprecated.
  • Updated dependencies [51970b3, 4444280, 085e371, b77aa19, dbb879a, 8b4ce84, 8d4cfe6, dd6ca1c, ce26fe2, 68a019d, 4cb4edf, 8de3555, b26307f, 68a019d]:

v1.2.1

Compare Source

Patch Changes

v1.2.0

Compare Source

Minor Changes
  • MCP client now attaches mcpMetadata (server name and version) to every tool it creates, enabling automatic MCP_TOOL_CALL span tracing without user code changes. (#​13274)
Patch Changes

v1.1.0

Compare Source

Minor Changes
  • Added requestContext support to the custom fetch option in MCP client HTTP server definitions. The fetch function now receives the current request context as an optional third argument, enabling users to forward authentication cookies, bearer tokens, and other request-scoped data from the incoming request to remote MCP servers during tool execution. (#​13773)

    Example usage:

    const mcp = new MCPClient({
      servers: {
        myServer: {
          url: new URL('https://api.example.com/mcp'),
          fetch: async (url, init, requestContext) => {
            const headers = new Headers(init?.headers);
            const cookie = requestContext?.get('cookie');
            if (cookie) {
              headers.set('cookie', cookie);
            }
            return fetch(url, { ...init, headers });
          },
        },
      },
    });

    This change is fully backward-compatible — existing fetch functions with (url, init) signatures continue to work unchanged. Closes #​13769.

Patch Changes

v1.0.3

Compare Source

Patch Changes

v1.0.2

Compare Source

Patch Changes
  • Fixed MCP tool results returning empty {} when the server does not include structuredContent in responses (e.g. FastMCP, older MCP protocol versions). The client now extracts the actual result from

Note

PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot force-pushed the renovate/mastra-mcp-1.x branch from 82fa005 to c918bb0 Compare January 22, 2026 07:20
@renovate renovate Bot force-pushed the renovate/mastra-mcp-1.x branch 3 times, most recently from 5c7c7a0 to d4cd4dc Compare February 17, 2026 18:41
@renovate renovate Bot force-pushed the renovate/mastra-mcp-1.x branch 3 times, most recently from e16d39b to 4d05e36 Compare March 4, 2026 15:08
@renovate renovate Bot force-pushed the renovate/mastra-mcp-1.x branch 3 times, most recently from cadf916 to 944e923 Compare March 12, 2026 04:59
@renovate renovate Bot force-pushed the renovate/mastra-mcp-1.x branch 3 times, most recently from 5eb4d2a to ce86bb7 Compare March 20, 2026 12:41
@renovate renovate Bot force-pushed the renovate/mastra-mcp-1.x branch 3 times, most recently from a469e50 to a089d71 Compare April 1, 2026 00:50
@renovate renovate Bot force-pushed the renovate/mastra-mcp-1.x branch 2 times, most recently from 0d5a094 to b79563b Compare April 12, 2026 12:23
@renovate renovate Bot force-pushed the renovate/mastra-mcp-1.x branch 2 times, most recently from fb5aeb2 to 86d6d31 Compare April 22, 2026 04:51
@renovate renovate Bot force-pushed the renovate/mastra-mcp-1.x branch 2 times, most recently from 9244436 to f1a8913 Compare April 29, 2026 00:55
@renovate renovate Bot force-pushed the renovate/mastra-mcp-1.x branch from f1a8913 to 5b75a61 Compare May 4, 2026 22:47
@renovate renovate Bot force-pushed the renovate/mastra-mcp-1.x branch 2 times, most recently from 7102a85 to 756c032 Compare May 18, 2026 12:11
@renovate renovate Bot force-pushed the renovate/mastra-mcp-1.x branch from 756c032 to 9a7e82f Compare May 21, 2026 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants